<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
     const p1 = new Promise((resolve,reject)=>{
        console.log('请求a数据');
        // 设置循环
        setTimeout(()=>{
            console.log('请求a数据成功');
            resolve('我是成功的数据')
            reject('我是失败的数据')
            console.log('我是来检测内部的');
        },2000)

     })   
     console.log("p1",p1);
    </script>
</body>
</html>